home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / misc / identify / identify_dev / arexx / commodities.ify < prev    next >
Text File  |  1999-05-14  |  1KB  |  49 lines

  1. /*****************************************************************
  2. **                                                              **
  3. **  commodities.ify     rexxidentify.library demonstration      **
  4. **                                                              **
  5. ******************************************************************
  6. **
  7. **      (c) 1997 by Richard Körber -- All Rights Reserved
  8. **
  9. **      You may use this example freely for your own programs.
  10. **
  11. */
  12.  
  13.   /* Add the library functions */
  14. CALL AddLib("/libs/rexxidentify.library",0,-30,0)
  15. IF Word(ID_Release(),1)<4 THEN DO
  16.   SAY "This script requires at least rexxidentify.library release 4!"
  17.   EXIT
  18. END
  19.  
  20.   /* Lock a commodity slot */
  21. slot = ID_LockCX()
  22.  
  23.   /* List up all commodities */
  24. DO i=0 TO ID_CountCX(slot)-1
  25.   name   = Left(ID_GetCX(slot,i,"NAME"),20)
  26.   title  = ID_GetCX(slot,i,"TITLE")
  27.   desc   = ID_GetCX(slot,i,"DESC")
  28.  
  29.   IF ID_GetCX(slot,i,"GUI") = 1 THEN
  30.     flags = "[GUI] "
  31.   ELSE
  32.     flags = ""
  33.  
  34.   IF ID_GetCX(slot,i,"ACTIVE") = 1 THEN
  35.     flags = flags||"[ACTIVE]"
  36.  
  37.   SAY "Name ........ :" name flags
  38.   SAY "  Title ..... :" title
  39.   SAY "  Description :" desc
  40.   SAY ""
  41. END
  42.  
  43.  /* Free the slot */
  44. CALL ID_UnlockCX(slot)
  45.  
  46. EXIT
  47.  
  48.  
  49.